# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'ui_mainWin.ui'
#
# Created: Thu Dec 17 16:56:24 2009
#	  by: PyQt4 UI code generator 4.6
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

class Ui_MainWindow(object):
	def curBrow(self):
		return self.tabWidget.currentWidget()
	
	def setupUi(self, MainWindow):
		MainWindow.setObjectName("MainWindow")
		MainWindow.resize(675, 606)
		icon = QtGui.QIcon()
		icon.addPixmap(QtGui.QPixmap("../../.designer/backup/drawing.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
		icon.addPixmap(QtGui.QPixmap("drawing.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
		MainWindow.setWindowIcon(icon)
		self.centralwidget = QtGui.QWidget(MainWindow)
		self.centralwidget.setObjectName("centralwidget")
		self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
		self.verticalLayout.setObjectName("verticalLayout")
		self.searchGrid = QtGui.QGridLayout()
		self.searchGrid.setObjectName("searchGrid")
		self.tabRadios = QtGui.QVBoxLayout()
		self.tabRadios.setObjectName("tabRadios")
		self.addTab = QtGui.QPushButton(self.centralwidget)
		self.addTab.setFocusPolicy(0)
		self.addTab.setObjectName("addTab")
		self.tabRadios.addWidget(self.addTab)
		self.removeTab = QtGui.QPushButton(self.centralwidget)
		self.removeTab.setFocusPolicy(0)
		self.removeTab.setObjectName("ramoveTab")
		self.tabRadios.addWidget(self.removeTab)
		self.searchGrid.addLayout(self.tabRadios, 0, 1, 1, 1)
		self.lineEdit = QtGui.QLineEdit(self.centralwidget)
		self.lineEdit.setObjectName("lineEdit")
		self.searchGrid.addWidget(self.lineEdit, 0, 0, 1, 1)
		self.searchGrid.setColumnStretch(0, 2)
		self.verticalLayout.addLayout(self.searchGrid)
		self.tabWidget = QtGui.QTabWidget(self.centralwidget)
		self.tabWidget.setObjectName("tabWidget")
		self.verticalLayout.addWidget(self.tabWidget)
		MainWindow.setCentralWidget(self.centralwidget)
		self.menubar = QtGui.QMenuBar(MainWindow)
		self.menubar.setGeometry(QtCore.QRect(0, 0, 675, 25))
		self.menubar.setObjectName("menubar")
		self.menuTyed = QtGui.QMenu(self.menubar)
		self.menuTyed.setObjectName("menuTyed")
		self.menuHelp = QtGui.QMenu(self.menubar)
		self.menuHelp.setObjectName("menuHelp")
		MainWindow.setMenuBar(self.menubar)
		self.statusbar = QtGui.QStatusBar(MainWindow)
		self.statusbar.setObjectName("statusbar")
		MainWindow.setStatusBar(self.statusbar)
		self.action_Quit = QtGui.QAction(MainWindow)
		self.action_Quit.setObjectName("action_Quit")
		self.action_help = QtGui.QAction(MainWindow)
		self.action_help.setObjectName("action_help")
		self.actionAdd_Data = QtGui.QAction(MainWindow)
		self.actionAdd_Data.setObjectName("actionAdd_Data")
		self.actionRawDB = QtGui.QAction(MainWindow)
		self.actionRawDB.setObjectName("actionRawDB")
		
		self.actionAdd_Base = QtGui.QAction(MainWindow)
		self.actionAdd_Base.setObjectName("actionAdd_Base")
		self.menuTyed.addAction(self.actionRawDB)
		self.menuTyed.addAction(self.actionAdd_Base)
		self.menuTyed.addAction(self.actionAdd_Data)
		self.menuTyed.addAction(self.action_Quit)
		self.menuHelp.addAction(self.action_help)
		self.menubar.addAction(self.menuTyed.menuAction())
		self.menubar.addAction(self.menuHelp.menuAction())

		self.retranslateUi(MainWindow)
		self.tabWidget.setCurrentIndex(0)
		QtCore.QMetaObject.connectSlotsByName(MainWindow)

	def retranslateUi(self, MainWindow):
		MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "PythonGallery", None, QtGui.QApplication.UnicodeUTF8))
		self.addTab.setText(QtGui.QApplication.translate("MainWindow", "+", None, QtGui.QApplication.UnicodeUTF8))
		self.removeTab.setText(QtGui.QApplication.translate("MainWindow", "-", None, QtGui.QApplication.UnicodeUTF8))
		self.menuTyed.setTitle(QtGui.QApplication.translate("MainWindow", "PythonGallery", None, QtGui.QApplication.UnicodeUTF8))
		self.menuHelp.setTitle(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8))
		self.action_Quit.setText(QtGui.QApplication.translate("MainWindow", "&Quit", None, QtGui.QApplication.UnicodeUTF8))
		self.action_help.setText(QtGui.QApplication.translate("MainWindow", "&help", None, QtGui.QApplication.UnicodeUTF8))
		self.actionAdd_Data.setText(QtGui.QApplication.translate("MainWindow", "Add &Data ", None, QtGui.QApplication.UnicodeUTF8))
		self.actionAdd_Base.setText(QtGui.QApplication.translate("MainWindow", "Add &Base ", None, QtGui.QApplication.UnicodeUTF8))
		self.actionRawDB.setText(QtGui.QApplication.translate("MainWindow", "Show table contents ", None, QtGui.QApplication.UnicodeUTF8))
		
	def newTab(self):
		'''creates an empty tab'''
		self.tabWidget.setUpdatesEnabled(False)
		new = QtGui.QTextBrowser()
		new.setObjectName("")
		new.setOpenLinks(False)
		self.tabWidget.addTab(new,"")
		self.tabWidget.setTabText(self.tabWidget.indexOf(new), QtGui.QApplication.translate("MainWindow", "PythonGallery", None, QtGui.QApplication.UnicodeUTF8))
		self.tabWidget.setUpdatesEnabled(True)
		self.tabWidget.setCurrentIndex(self.tabWidget.count()-1)
		self.lineEdit.setText("")
		return new
	
	def deleteTab(self):
		self.tabWidget.removeTab(self.tabWidget.currentIndex())
		
	def curTabText(self,text=None):
		'''returns the title text of the cuttent tab'''
		if text==None:
			return self.tabWidget.tabText(self.tabWidget.currentIndex())
		self.tabWidget.setTabText(self.tabWidget.currentIndex(),QtCore.QString(text))

